home *** CD-ROM | disk | FTP | other *** search
/ Adobe Graphics & Publishing SDK 1996 December / Adobe Graphics & Publishing SDK 1996 December.iso / mac / Illustrator 6.0 SDK r1 Mac / AI Plugin Interface / AIWindow.h < prev   
Text File  |  1995-12-21  |  4KB  |  164 lines

  1. /**
  2.  
  3.     AIWindow.h
  4.     Copyright (c) 1995 Adobe Systems Incorporated.
  5.     All Rights Reserved
  6.  
  7.     Adobe Illustrator 6.0 Window Suite.
  8.  
  9.  **/
  10.  
  11. #ifndef __AIWindow__
  12. #define __AIWindow__
  13.  
  14.  
  15. /*******************************************************************************
  16.  **
  17.  **    Imports
  18.  **
  19.  **/
  20.  
  21. #include "AITypes.h"
  22. #include "AIEvent.h"
  23. #include "AIPlugin.h"
  24.  
  25.  
  26. #if Macintosh
  27.     #ifdef __cplusplus
  28.     extern "C" {
  29.     #endif
  30.     
  31.     #if PRAGMA_ALIGN_SUPPORTED
  32.     #pragma options align=mac68k
  33.     #endif
  34.     
  35.     #if PRAGMA_IMPORT_SUPPORTED
  36.     #pragma import on
  37.     #endif
  38. #endif
  39.  
  40.  
  41. /*******************************************************************************
  42.  **
  43.  ** Constants
  44.  **
  45.  **/
  46.  
  47. #define kAIWindowSuite            "AI Window Suite"
  48. #define kAIWindowVersion        3
  49. #if Macintosh
  50. #define kAIMacWindowSuite        "AI Mac Window Suite"
  51. #define kAIMacWindowVersion        3
  52. #endif
  53.  
  54. #define kAIWindowChangedNotifier            "AI Window Changed Notifier"
  55. #define kAIWindowLoseFocusNotifier            "AI Window Lose Focus Notifier"
  56. #define kAIWindowGainFocusNotifier            "AI Window Gain Focus Notifier"
  57.  
  58. // These are the window messages.
  59. #define kSelectorAIWindowEvent                "AI Window Event"
  60. #define kSelectorAIWindowTrackCursor        "AI Window Track Cursor"
  61. #define kSelectorAIGainWindowKeyboardFocus    "AI Gain Window Keyboard Focus"
  62. #define kSelectorAILoseWindowKeyboardFocus    "AI Lose Window Keyboard Focus"
  63. #if Macintosh
  64. #define kSelectorAIMacShowWindow            "AI Mac Show Window"
  65. #define kSelectorAIMacHideWindow            "AI Mac Hide Window"
  66. #define kSelectorAIMacZoomWindow            "AI Mac Zoom Window"
  67. #endif
  68.  
  69.  
  70. // These are the options available to a window.
  71. #define kWindowWantsToTrackCursorOption        (1L<<0)
  72. #define kWindowWantsKeyboardFocusOption        (1L<<1)
  73.  
  74.  
  75. /*******************************************************************************
  76.  **
  77.  ** Types
  78.  **
  79.  **/
  80.  
  81. // This is a reference to a window. It is never dereferenced.
  82. typedef struct _t_AIWindowOpaque *AIWindowHandle;
  83.  
  84. #if Macintosh
  85. // Macintosh parameters used when creating a window.
  86. typedef struct {
  87.     Rect bounds;
  88.     StringPtr title;
  89.     short wDefProcID;
  90.     Boolean goAwayFlag;
  91.     long refCon;
  92. } PlatformAddWindowData;
  93.  
  94. // A Macintosh window.
  95. typedef WindowPtr PlatformWindow;
  96. #endif
  97.  
  98.  
  99. // The contents of a window message.
  100. typedef struct {
  101.     AIPluginData d;
  102.     AIWindowHandle window;
  103.     PlatformEvent event;
  104. } AIWindowMessage;
  105.  
  106.  
  107. /*******************************************************************************
  108.  **
  109.  **    Suite
  110.  **
  111.  **/
  112.  
  113. typedef struct {
  114.  
  115.     MACPASCAL FXErr (*AddWindow) ( AIPluginHandle self, char *name, long options,
  116.                 PlatformAddWindowData *data, AIWindowHandle *window );
  117.  
  118.     MACPASCAL FXErr (*GetWindowName) ( AIWindowHandle window, char **name );
  119.     MACPASCAL FXErr (*GetWindowOptions) ( AIWindowHandle window, long *options );
  120.     MACPASCAL FXErr (*SetWindowOptions) ( AIWindowHandle window, long options );
  121.     MACPASCAL FXErr (*GrabKeyboardFocus) ( AIWindowHandle window );
  122.     MACPASCAL FXErr (*LoseKeyboardFocus) ( AIWindowHandle window );
  123.     MACPASCAL FXErr (*GetWindowPlugin) ( AIWindowHandle window, AIPluginHandle *plugin );    
  124.  
  125.     MACPASCAL FXErr (*CountWindows) ( long *count );
  126.     MACPASCAL FXErr (*GetNthWindow) ( long n, AIWindowHandle *window );
  127.  
  128.     MACPASCAL FXErr (*GetPlatformWindow) ( AIWindowHandle window,
  129.                 PlatformWindow *platformWindow );
  130.  
  131. } AIWindowSuite;
  132.  
  133.  
  134. #if Macintosh
  135. typedef struct {
  136.  
  137.     MACPASCAL void (*MacXDragWindow) ( WindowPtr theWindow, Point startPoint,
  138.                 Rect *limitRect );
  139.     MACPASCAL long (*MacXGrowWindow) ( WindowPtr theWindow, Point startPoint,
  140.                 Rect *sizeRect );
  141.     MACPASCAL Boolean (*MacXZoomWindow) ( WindowPtr theWindow,
  142.                 short desiredWidth, short desiredHeight, Boolean stickToEdges,
  143.                 short *newWidth, short *newHeight );
  144.  
  145. } AIMacWindowSuite;
  146. #endif
  147.  
  148.  
  149. #if Macintosh
  150.     #if PRAGMA_IMPORT_SUPPORTED
  151.     #pragma import off
  152.     #endif
  153.     
  154.     #if PRAGMA_ALIGN_SUPPORTED
  155.     #pragma options align=reset
  156.     #endif
  157.     
  158.     #ifdef __cplusplus
  159.     }
  160.     #endif
  161. #endif
  162.  
  163. #endif
  164.